package cn.gok.mybatisplus22.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @ClassName Class
 * @Description TODO
 * @Author HP
 * @Date 8:58 2022/7/22
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("clazz")//指向数据库里面的表名
public class Clazz {
    private static final long serialVersionUID = 1L;//实现序列化接口
    @TableId(value = "cid", type = IdType.AUTO)
    private long cid;
    private String cname;
    @Version//@Version注解，可以实现乐观锁功能
    private Integer version;
    @TableLogic//逻辑删除注解
    private Integer delted;
    @TableField(fill = FieldFill.INSERT)// @TableField完成字段自动填充
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
